<template>
  <div class="flex-column h-100">
    <header class="flex-middle-center bg-app">
      <div class="header-left"><a onclick="history.back()"><i class="iconfont icon-back"></i> </a></div>
      {{title}}
    </header>
    <iframe class="grow" :src="src"></iframe>
  </div>
</template>

<script>
import xHeader from '../widgets/header'
import { domain } from '../../constants'

const titles = {
  agreement: '服务条款',
  rule: '玩法说明'
}
export default {
  components: {xHeader},
  name: 'frame',
  computed: {
    title () {
      return titles[this.$route.query.type || 'rule']
    },
    src () {
      return domain + this.$route.query.view + '.html'
    }
  }
}
</script>

<style>

</style>
